home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / TPUG Xtras / Xtras / club1.d64 / baseball64.v3 (.txt) < prev    next >
Commodore BASIC  |  2009-02-07  |  7KB  |  249 lines

  1. 55 REM********************************
  2. 56 REM  PET SUPER BASEBALL VERS 7.3
  3. 57 REM
  4. 58 REM    DEVELOPED BY JINSHI SUZUKI
  5. 59 REM    THE WORLD-FAMOUS PROGRAMMER
  6. 60 REM
  7. 61 REM   SPECIAL THANKS TO SEIBU DEP.
  8. 62 REM           AND MR.HIRAKI
  9. 63 REM
  10. 64 REM FIXES BY GORD CAMPBELL
  11. 65 REM
  12. 66 REM COMMODORE 64 MODS BY: BILL MUNCH
  13. 67 REM            8301.29
  14. 68 REM ADD 64 MODS BY: FRED LAYBERGER                          OMAHA, NEBRASKA
  15. 69 REM********************************
  16. 70 POKE646,11:POKE53280,13:POKE53281,15
  17. 71 PRINT"[147]     THESE BUTTONS MOVE THE
  18. 75 [153]"    (null)LEFT$    OUT-FIELD PLAYERS
  19. 80 PRINT"   [206] [200]       RIGHT OR LEFT
  20. 85 [153]"  (null)  LEFT$
  21. 90 PRINT" Q   E
  22. 95 [153]"                    *PRESS 'F1' TO SWING
  23. 100 PRINT" A S D [196]SLOW BALLS  *PRESS 'F3' TO MAKE
  24. 105 [153]"                       THE THIRD BASE"
  25. 110 [153]"                       RUNNER HOLD UP."
  26. 115 [153]" Z X C STR$FAST BALLS
  27. 120 PRINT" [194] [194] [194]
  28. 125 [153]" PEEKCLOSEPEEKCLOSEPEEK
  29. 130 PRINT" [194] [194]  CURVE
  30. 135 [153]" PEEK PEEK
  31. 140 PRINT" [194]  STRAIGHT
  32. 145 [153]" PEEK
  33. 150 PRINT"  KNUCKLER
  34. 155 [153]"PRESS A KEY TO CONTINUE
  35. 160 GETY$:IFY$=""THEN160
  36. 165 DIMPG$(8),PT$(8),G%(8),T%(8),C$(3):F=-1:C$(0)="   ":C$(1)="[209][151]":C$(2)="[209][209][151]"
  37. 170 C$(3)="[209][209][209][151]":P$="":PC=54272:C=6:CC=2:D=1:FC=0
  38. 175 REM PET SOUND  POKE59467,16:POKE59466,1:POKE59464,0
  39. 180 PRINT"[147]WHO IS ON THE MOUND TODAY?"
  40. 185 INPUT"EXPOS";PG$(8):INPUT"BLUE JAYS";PT$(8)
  41. 190 FORN=0TO7:READPG$(N):NEXT
  42. 195 FORN=0TO7:READPT$(N):NEXT:FORN=0TO8:READG%(N),T%(N):NEXT
  43. 200 PRINT"[147]":DIMA$(9),B$(9),BA(4):BA(0)=1:AT=0:BT=0
  44. 205 FORN=1TO9:A$(N)="0":B$(N)="0":NEXT
  45. 210 FORN=1TO17:PRINT"[205]";:NEXT:PRINT"[145]";:FORN=1TO17:PRINT"[206][145]";:NEXT
  46. 215 PRINT"[223][169][145]";:FORN=1TO6:PRINT"[206][145]";:NEXT:PRINT"[223][169]";
  47. 220 FORN=1TO6:PRINT"[205]";:NEXT:PRINT"[223][169]"
  48. 225 POKE1482,121:POKE1482+PC,D
  49. 230 PRINT"";
  50. 235 PRINTTAB(16);"[207][208]  [207][208]  [151]123456789"
  51. 240 PRINTTAB(16);"[165][167][223][169][165][167]"
  52. 245 PRINTTAB(16);"[204][186]  [204][186][151][193]"
  53. 250 PRINTTAB(22);"[151][216]":FORIN=1TO18:PS=1071
  54. 255 REM PET SOUND  POKE59464,221:POKE59466,0:POKE59467,0
  55. 260 FORN=1TO36:POKE1064+N,32:NEXT
  56. 265 PO=65:PD=88 :IFF>0THENPO=88:PD=65
  57. 270 POKE1071,PD:POKE1083,PD:POKE1094,PD:POKE1196,PD:POKE1206,PD
  58. 271 POKE1071+PC,C:POKE1083+PC,C:POKE1094+PC,C:POKE1196+PC,C:POKE1206+PC,C
  59. 275 POKE1516,PD:POKE1371,PD:POKE1482,PD:POKE1923,PD:POKE1395,PD
  60. 276 POKE1516+PC,C:POKE1371+PC,C:POKE1482+PC,C:POKE1923+PC,C:POKE1395+PC,C
  61. 280 FORN=1TO3:BA(N)=0:NEXT:POKE1450,32:POKE1240,32:POKE1516,32
  62. 285 IFIN<18ORBT<=ATTHEN815
  63. 290 POKE1897,86:POKE1897+PC,D:GOTO935
  64. 295 AD=1024+INT(.4+X)+INT(.5+Y)*40:SV=PEEK(AD):S1=PEEK(AD-1):S2=PEEK(AD+1)
  65. 300 POKEAD,CH:POKEAD+PC,FC:RETURN
  66. 305 POKE1803,78:POKE1803+PC,FC:GOSUB780:SS=TAN(1):POKE1803,32
  67. 306 POKE1763,100:POKE1763+PC,FC
  68. 310 SS=TAN(2):POKE1763,77:POKE1763+PC,FC:RETURN
  69. 315 POKE1802,77:POKE1802+PC,FC:GOSUB780:SS=TAN(2):POKE1802,32
  70. 316 POKE1762,100:POKE1762+PC,FC
  71. 320 GOSUB780:SS=TAN(5):POKE1762,78:POKE1762+PC,FC:RETURN
  72. 325 IFBA$THENRETURN
  73. 330 B0=BA(1)+BA(2)+BA(3):IFB0=0THENRETURN
  74. 335 IFF<0AND(PT=2ORPT=3)THENPRINTP$;PT$(PT);"!!":GOTO345
  75. 340 IFF>0AND(PG=2ORPG=3)THENPRINTP$;TAB(29);PG$(PG);"!!":GOTO345
  76. 345 IFB0=3ANDF>0THENPRINTP$;PT$(8);"!!"
  77. 350 IFB0=3ANDF<0THENPRINTP$;TAB(29);PG$(8);"!!"
  78. 355 FORM=1TO100:GETBA$:IFBA$THEN365
  79. 360 NEXT
  80. 365 PRINTP$;"          ";TAB(29);"          ":FORM=1TO200:NEXT:RETURN
  81. 370 X=19:POKE1762,121:POKE1762+PC,FC
  82. 375 POKE1763,121:POKE1763+PC,D:POKE1803,105:POKE1803+PC,D
  83. 376 POKE1762,121:POKE1762+PC,D:POKE1802,95:POKE1802+PC,D
  84. 379 POKE1842,32:POKE1923,PD:POKE1923+PC,C
  85. 380 IFH=1THENPOKE1804,101:POKE1804+PC,D:POKE1801,PO:POKE1801+PC,CC:GOTO390
  86. 385 POKE1801,103:POKE1801+PC,D:POKE1804,PO:POKE1804+PC,CC
  87. 390 BA=0
  88. 395 SP=0
  89. 400 GETBA$
  90. 405 GOSUB325
  91. 410 EE=0
  92. 415 IFBA$="A"THENEE=-1:GOTO1115
  93. 420 IFBA$="S"THEN455
  94. 425 IFBA$="D"THENEE=1:GOTO1115
  95. 430 IFBA$="Z"THENEE=-1:SP=1:GOTO1115
  96. 435 IFBA$="X"THENSP=1:GOTO455
  97. 440 IFBA$="C"THENEE=1:SP=1:GOTO1115
  98. 445 GOSUB785
  99. 450 GOTO390
  100. 455 ZZ=15+INT(RND(3)*2)
  101. 460 FORY=11TOZZ:CH=46:GOSUB295:FORM=1TO20-SP*15:NEXT:POKEAD,SV:POKEAD+PC,D
  102. 465 GETBA$:IFBA$<>"[133]"ORBA=1THEN475
  103. 470 BA=1:ONH+1GOSUB305,315
  104. 475 NEXTY
  105. 480 FORY=ZZ+1TO21:X=X+.4*EE:GOSUB295:FORM=1TO6-SP*5
  106. 485 GETBA$:IFBA$="[133]"THENTM=1:POKEAD,SV:POKEAD+PC,D:GOTO565
  107. 490 NEXT
  108. 495 POKEAD,SV:POKEAD+PC,D
  109. 500 NEXTY
  110. 505 PRINT"";
  111. 510 IFBA=1THEN530
  112. 515 IFEE=0ANDSP=0THEN530
  113. 520 IFEE<>0THEN555
  114. 525 IFRND(3)>.5THEN555
  115. 530 PRINT"STRIKE!![151]":S=S+1:IFS<3THEN815
  116. 535 GOSUB1125
  117. 540 PRINT"BATTER OUT!![151]":S=0:B=0:O=O+1:IFO<3ANDBA(3)=1ANDY<3THEN1045
  118. 545 IFO<3THEN815
  119. 550 PRINT"CHANGE!!     [151]":F=-F:O=0:GOTO875
  120. 555 PRINT"BALL!![151]":B=B+1:IFB<4THEN815
  121. 560 PRINT"WALK !![151]":GOSUB1125:S=0:B=0:GOTO980
  122. 565 IFBA=1THEN490
  123. 570 BA=1:ONH+1GOSUB305,315
  124. 575 IF(Y<>18ANDY<>19)OR(EE<>0ANDZZ=15)THEN490
  125. 580 IFEE=0THEN600
  126. 585 XX=RND(2):IFXX>.7THEN490
  127. 590 IFEE=-1THENCO=-1.7+RND(3):GOTO605
  128. 595 CO=.7+RND(3):GOTO605
  129. 600 CO=-1.4+RND(3)*1.7:IFY=18ANDH=0ORY=19ANDH=1THENCO=-.3+RND(3)*1.7
  130. 605 CH=46:FORY=17TO0STEP-1:X=X+CO:IFX<0ORX>39THEN645
  131. 610 GOSUB295:IFSV=PDOR(S1=PDORS2=PD)ANDY<3ANDBA(3)=1ANDO<2THEN620
  132. 615 FORM=1TO20-SP*18:NEXT:POKEAD,SV:POKEAD+PC,D:POKE1450+PC,CC
  133. 616 POKE1240+PC,CC:POKE1516+PC,CC:GOTO635
  134. 620 IFRND(3)>.85THENPRINT"ERROR!![151]":POKEAD+PC,C
  135. 621 IFRND(3)>.85THENPOKE1450+PC,CC:POKE1240+PC,CC:POKE1516+PC,CC:GOTO615
  136. 625 POKEAD,SV:POKEAD+PC,D:PRINT"CATCH!![151]":POKEAD+PC,C:POKE1482+PC,C
  137. 630 GOTO535
  138. 635 GOSUB780
  139. 640 NEXTY
  140. 645 PRINT"";
  141. 650 IFABS(CO)>1.1THEN680
  142. 655 GOSUB1125:M=ABS(X-18)
  143. 660 IFM<1THEN690
  144. 665 IFM<4THEN695
  145. 670 IFM<9THEN700
  146. 675 PRINT"SINGLE!![151]":HI=1:GOTO705
  147. 680 PRINT"FOUL!![151]":IFS=2THEN815
  148. 685 S=S+1:GOTO815
  149. 690 PRINT"HOME RUN!![151]":HI=4:GOTO705
  150. 695 PRINT"TRIPLE!![151]":HI=3:GOTO705
  151. 700 PRINT"DOUBLE!![151]":HI=2:GOTO705
  152. 705 FORLO=1TOHI
  153. 710 FORN=3TO0STEP-1:BA(N+1)=BA(N):NEXT:BA(0)=0
  154. 715 FORM=1TO70:GOSUB780:NEXT
  155. 720 POKE1450,-(BA(1)=1)*PO-(BA(1)=0)*32
  156. 721 POKE1450+PC,CC
  157. 725 POKE1240,-(BA(2)=1)*PO-(BA(2)=0)*32
  158. 726 POKE1240+PC,CC
  159. 730 POKE1516,-(BA(3)=1)*PO-(BA(3)=0)*32
  160. 731 POKE1516+PC,CC
  161. 735 IFBA(4)=0THEN760
  162. 740 PRINT" SCORE!![151]":FORM=1TO45:GOSUB780:NEXT:PRINT"[145]         "
  163. 745 IFF>0THEN755
  164. 750 A$(IN/2+1)=STR$(VAL(A$(IN/2+1))+1):AT=AT+1:GOTO760
  165. 755 B$(IN/2)=STR$(VAL(B$(IN/2))+1):BT=BT+1
  166. 760 NEXT
  167. 765 IFIN=18ANDBT>ATTHEN1035
  168. 770 S=0:B=0
  169. 775 BA(0)=1:GOTO815
  170. 780 GETBA$
  171. 785 IFBA$="Q"THENDR=-1:GOTO800
  172. 790 IFBA$="E"THENDR=1:GOTO800
  173. 795 RETURN
  174. 800 IF(PS=32809ANDDR=-1)OR(PS=32821ANDDR=1)THENRETURN
  175. 805 POKEPS,32:POKEPS+DR,PD:POKEPS+DR+PC,C:POKEPS+12,32
  176. 806 POKEPS+12+DR,PD:POKEPS+12+DR+PC,C
  177. 810 POKEPS+23,32:POKEPS+23+DR,PD:POKEPS+23+DR+PC,C:M=M+10:PS=PS+DR:RETURN
  178. 815 PRINT" S:";C$(S):PRINT" B:";C$(B):PRINT" O:";C$(O)
  179. 820 PRINT"";TAB(34);":";AT
  180. 825 PRINTTAB(34);":";BT:FORM=1TO50:GOSUB780:NEXT
  181. 830 PRINT"";TAB(16);"               [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";
  182. 835 IFF<0THENPRINTPT$(PT);
  183. 840 IFF>0THENPRINTPG$(PG);
  184. 845 H=-(F>0)*G%(PG)-(F<0)*T%(PT)
  185. 850 PRINT"        "
  186. 855 PRINT"          "
  187. 860 PRINT"             "
  188. 865 PRINT"             "
  189. 870 GOTO370
  190. 875 PRINT"";TAB(24);
  191. 880 FORA=1TOINT((IN+1)/2)
  192. 885 IFVAL(A$(A))>9THENPRINT"";
  193. 890 PRINTRIGHT$(A$(A),1);:PRINT"[146]";:NEXT
  194. 895 PRINT
  195. 900 IFIN=1THEN930
  196. 905 PRINTTAB(24);
  197. 910 FORW=1TOINT(IN/2)
  198. 915 IFVAL(B$(W))>9THENPRINT"";
  199. 920 PRINTRIGHT$(B$(W),1);:PRINT"[146]";:NEXT
  200. 925 IFF0THEN1040
  201. 930 NEXTIN
  202. 935 PRINT"          "
  203. 940 PRINT"             "
  204. 945 PRINT"               "
  205. 950 PRINT"";
  206. 955 IFAT>BTTHENPRINT"BLUE JAYS ";:GOTO975
  207. 960 IFAT<BTTHENPRINT"EXPOS ";:GOTO975
  208. 965 PRINT"DRAW GAME!!!"
  209. 970 INPUT"  WOULD YOU LIKE TO PLAY AGAIN";Y$:IFY$="Y"THENRUN
  210. 972 END
  211. 975 PRINT"HAVE WON!!![151]":GOTO970
  212. 980 IFBA(1)=0THENFORM=1TO1000:NEXT:BA(1)=1:POKE1450,PO:POKE1450+PC,CC:GOTO815
  213. 985 IFBA(2)=0THENFORM=1TO1000:NEXT:BA(2)=1:POKE1240,PO:POKE1240+PC,CC:GOTO815
  214. 990 IFBA(3)=0THENFORM=1TO1000:NEXT:BA(3)=1:POKE1516,PO:POKE1516+PC,CC:GOTO815
  215. 995 PRINT" SCORE!!"
  216. 1000 FORM=1TO45:GOSUB780:NEXT
  217. 1005 PRINT"[145]         "
  218. 1010 IFF>0THEN1020
  219. 1015 A$(IN/2+1)=STR$(VAL(A$(IN/2+1))+1):AT=AT+1:GOTO815
  220. 1020 B$(IN/2)=STR$(VAL(B$(IN/2))+1):BT=BT+1
  221. 1025 IFIN=18ANDBT>ATTHEN1035
  222. 1030 GOTO815
  223. 1035 F0=1:GOTO875
  224. 1040 PRINT:PRINT"";TAB(35);BT:GOTO290
  225. 1045 POKE1923,32:POKE1842,PD:POKE1842+PC,C:X0=(18-X)/17:FORY=2TO19:GOSUB295
  226. 1050 FORM=1TO9:GETTU$:IFTU$="[134]"THEN1060
  227. 1055 NEXT:POKEAD,SV:X=X+X0:POKEAD+PC,D:NEXTY:GOTO815
  228. 1060 BS=.8+.3*RND(2)
  229. 1061 POKEAD,SV:POKEAD+PC,D:PRINT"FROM THIRD":BA(3)=0
  230. 1065 RA=1516
  231. 1070 POKERA,32:POKERA+41,PO:POKERA+41+PC,CC:Y=Y+2.5*BS:X=X+X0*2.5*BS
  232. 1071 GOSUB295:RA=RA+41
  233. 1075 IFY>18THEN1090
  234. 1080 IFRA=1762THEN1110
  235. 1085 FORM=1TO10:GOSUB780:NEXT:POKEAD,SV:POKEAD+PC,D:GOTO1070
  236. 1090 PRINT"HE'S OUT!![151]"
  237. 1095 FORMM=1516TO1721STEP41:POKEMM,32:NEXT
  238. 1100 POKEAD,SV:POKEAD+PC,D:O=O+1:IFO<3THEN815
  239. 1105 PRINT"[145][145][145]";:GOTO550
  240. 1110 PRINT"SAFE! SCORE![151]":POKEAD,SV:POKEAD+PC,D:GOTO1010
  241. 1115 IFRND(3)>.3THEN455
  242. 1120 EE=0:GOTO455
  243. 1125 IFF<0THENPT=PT+1:IFPT=9THENPT=0
  244. 1130 IFF>0THENPG=PG+1:IFPG=9THENPG=0
  245. 1135 POKE1801,103:POKE1801+PC,D:POKE1804,101:POKE1804+PC,D:RETURN
  246. 1140 DATASCOTT,DAWSON,CARTER,STAUB,PARRISH,CROMARTY,WHITE,SPEIER,MOSEBY
  247. 1145 DATAGRIFFIN,AINGE,VELEZ,HOWELL,MAYBERRY,WOODS,WHITT
  248. 1150 DATA0,0,1,1,0,0,0,1,1,0,0,1,1,1,1,0,1,1
  249.